﻿namespace WMS6.Services
{
    using System;
    using System.Data;
    using System.ServiceModel;
    using System.ServiceModel.Activation;
    using WMS6.BLL;
    using WMS6.Common;
    using WMS6.DataEntity;
    using WMS6.QueryEntity;

    [AspNetCompatibilityRequirements(RequirementsMode=AspNetCompatibilityRequirementsMode.Allowed), ServiceBehavior(InstanceContextMode=InstanceContextMode.PerCall)]
    public class AnalyticsReportService : IAnalyticsReportService
    {
        public DataSet GetAdjustMentRptDataSet(InvAdjustmentRptQueryEntity InvAdjustmentRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetAdjustMentRptDataSet(InvAdjustmentRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetASNStatusRptInfo(ASNStatusRptQueryEntity asnStatusRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReportBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReportBll.GetASNStatusRptInfo(asnStatusRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetCustomerReturnDetailRptDataSet(CustomerReturnDetailRptQueryEntity customerReturnDetailRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetCustomerReturnDetailRptDataSet(customerReturnDetailRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetDiffCountReportList(DiffCountRptQueryEntity diffCountRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetDiffCountReportList(diffCountRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetEmptyLocationRptInfo(EmptyLocationRptQueryEntity emptyLocationRptQuery, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetEmptyLocationRptInfo(emptyLocationRptQuery);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetFinanceInOutStockDetailRptDataSet(FinanceInOutStockDetailRptQueryEntity financeInOutStockDetailRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetFinanceInOutStockDetailRptDataSet(financeInOutStockDetailRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetFinanceSalesDetailByDateRptDataSet(FinanceSalesDetailRptQueryEntiry financeSalesDetailRptQueryEntiry, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetFinanceSalesDetailByDateRptDataSet(financeSalesDetailRptQueryEntiry);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetFinanceSalesDetailRptDataSet(FinanceSalesDetailRptQueryEntiry financeSalesDetailRptQueryEntiry, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetFinanceSalesDetailRptDataSet(financeSalesDetailRptQueryEntiry);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetGlobalInventoryRptDataSet(GlobalInventoryRptQueryEntity globalInventoryRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetGlobalInventoryRptDataSet(globalInventoryRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetIdleInventoryRptDataSet(IdleInventoryRptQueryEntiry idleInventoryRptQueryEntiry, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetIdleInventoryRptDataSet(idleInventoryRptQueryEntiry);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetInOutBlanaceRptDataSet(InOutBlanaceRptQueryEntity inOutBlanaceRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetInOutBlanaceRptDataSet(inOutBlanaceRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetInOutInvRptDetailDataSet(InOutStockRptDetailQueryEntity InOutStockRptDetailQuery, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetInOutInvRptDetailDataSet(InOutStockRptDetailQuery);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetInOutStockRptDetailInfo(InOutStockRptDetailQueryEntity InOutStockRptDetailQuery, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetInOutStockRptDetailInfo(InOutStockRptDetailQuery);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetInOutStockRptInfo(InOutStockRptQueryEntity InOutStockRptQuery, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetInOutStockRptInfo(InOutStockRptQuery);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetInvLocSkyTransRptDataSet(InvLocSkyTransRptQueryEntity invLocSkyTransRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetInvLocSkyTransRptDataSet(invLocSkyTransRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetLocationRptInfo(LocationRptQueryEntity locationRptQuery, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetLocationRptInfo(locationRptQuery);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetOnTheWayOrderRptDataSet(OnTheWayOrderRptQueryEntity onTheWayOrderRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetOnTheWayOrderRptDataSet(onTheWayOrderRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetOperationLogDataSet(OperationLogQueryEntity operationLogQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetOperationLogDataSet(operationLogQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetOwnerTransferRptDataSet(OwnerTransferRptQueryEntity ownerTransferRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetOwnerTransferRptDataSet(ownerTransferRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetPhysicalCountReportDataSet(PhysicalCountDiffRptQueryEntity physicalCountDiffRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetPhysicalCountReportDataSet(physicalCountDiffRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetPhysicalCountReportList(PhysicalCountRptQueryEntity physicalCountRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetPhysicalCountReportList(physicalCountRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetPickingRptInfo(PickingRptQueryEntity PickingRptQuery, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetPickingRptInfo(PickingRptQuery);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetPurchasePlanRptDataSet(PurchasePlanRptQueryEntity purchasePlanRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetPurchasePlanRptDataSet(purchasePlanRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetPurchasePlanRptDataSet(VendorReturnDetailRptQueryEntity vendorReturnDetailRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetVendorReturnDetailRptDataSet(vendorReturnDetailRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetReceiptDetailRptInfo(ReceiptDetailRptQueryEntity receiptDetailRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReportBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReportBll.GetReceiptDetailRptInfo(receiptDetailRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetReceiptRptInfo(ReceiptRptQueryEntity ReceiptRptQuery, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetReceiptRptInfo(ReceiptRptQuery);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetSafeInventoryRptInfo(SafeInventoryRptQueryEntity safeInventoryRptQuery, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetSafeInventoryRptInfo(safeInventoryRptQuery);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetShelflifeRptInfo(ShelflifeRptQueryEntity ShelflifeRptQuery, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetShelflifeRptInfo(ShelflifeRptQuery);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetShipmentOrderDetailRptInfo(ShipmentOrderDetailRptQueryEntity shipmentOrderDetailRptQuery, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetShipmentOrderDetailRptInfo(shipmentOrderDetailRptQuery);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetShipmentOrderRptInfo(ShipmentOrderRptQueryEntity shipmentOrderRptQuery, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetShipmentOrderRptInfo(shipmentOrderRptQuery);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetShipmentOrderRptStatistics(ShipmentOrderRptQueryEntity shipmentOrderRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetShipmentOrderRptStatistics(shipmentOrderRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetShipmentOrderStatusRptInfo(ShipmentOrderStatusRptQueryEntity shipmentOrderStatusRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetShipmentOrderStatusRptInfo(shipmentOrderStatusRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetShipmentStatByCustomerRptDataSet(ShipmentStatByCustomerRptQueryEntity shipmentStatByCustomerRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetShipmentStatByCustomerRptDataSet(shipmentStatByCustomerRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetShipmentStatByOrderRptDataSet(ShipmentStatByOrderRptQueryEntity shipmentStatByOrderRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetShipmentStatByOrderRptDataSet(shipmentStatByOrderRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetShipmentStatSplitCustomerRptDataSet(ShipmentStatSplitCustomerRptQueryEntity shipmentStatSplitCustomerRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetShipmentStatSplitCustomerRptDataSet(shipmentStatSplitCustomerRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetStockRptInfo(StockRptQueryEntity stockRptQuery, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetStockRptInfo(stockRptQuery);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetVendorReturnDetailRptDataSet(VendorReturnDetailRptQueryEntity vendorReturnDetailRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetVendorReturnDetailRptDataSet(vendorReturnDetailRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GetWarehouseTransferRptDateSet(WarehouseTransferRptQueryEntity warehouseTransferRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GetWarehouseTransferRptDateSet(warehouseTransferRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }

        public DataSet GlobalInventoryWithWHRptDataSet(GlobalInventoryWithWHRptQueryEntity GlobalInventoryWithWHRptQueryEntity, PubParasInfo pubParasInfo)
        {
            try
            {
                AnalyticsReportBLL analyticsReoprtBll = new AnalyticsReportBLL(pubParasInfo);
                return analyticsReoprtBll.GlobalInventoryWithWHRptDataSet(GlobalInventoryWithWHRptQueryEntity);
            }
            catch (Exception ex)
            {
                CommonErrorHandler.ErrorTypeExchange(ex, "AnalyticsReportServices异常");
            }
            return null;
        }
    }
}

